<tagLib name="html"/>
<include file="./Index/Tpl/Home/default/public/header.htm" />
<link href="__PUBLIC__/css/inn-adm-base.css" type="text/css" rel="stylesheet" />
<style type="text/css">
.sjht_xx{
	padding-top:0px;
	margin:0;
	font-size:12px;
	color:#000;
	line-height:15px;
}
.sjht_fd table{
	border-top:2px solid #35AFC1;
	border-left:1px solid #e0e0e0;
	text-align:center;
}
.sjht_fd table td{
	border-right:1px solid #e0e0e0;
	border-bottom:1px solid #e0e0e0;
	padding:5px;
}
.sjht_fd table .title{
	height:33px;
	background:url(__PUBLIC__/images/tr_bg.png);
}
.sjht_fd table .title td{
	padding:0px;
}
.sjht_fd a{
	color:#0069CA;
}
</style>
<script src="http://cdn.jquerytools.org/1.2.7/form/jquery.tools.min.js"></script>
<script type="text/javascript">
(function($){
    $(function(){
        $("form.vali").validator({
            messageClass:"yellow",
            position:"bottom left"
        });
    });
})(jQuery);
</script>
<link href="__PUBLIC__/jsLibrary/jquerytools/dateinput/skin1.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
(function($){
    $(function(){
        $.tools.dateinput.localize("zh-cn",  {
            months:        '一月,二月,三月,四月,五月,六月,七月,' +
                           '八月,九月,十月,十一月,十二月',
            shortMonths:   '一月,二月,三月,四月,五月,六月,七月,' +
                           '八月,九月,十月,十一月,十二月',
            days:          '周日,周一,周二,周三,周四,周五,周六',
            shortDays:     '日,一,二,三,四,五,六'
        });
        $("input[name='begin'],input[name='end']").dateinput({
            lang: 'zh-cn',
            format: 'yyyy-mm-dd',
            offset: [0, 0],
            selectors: true
        });
        $("#myform").validator({
            messageClass:"yellow",
            position:"bottom left"
        });
        
        $("#myform input").focus(function(){
            $(this).addClass('input_hover');
        }).blur(function(){
            $(this).removeClass('input_hover');
        });
    });
})(jQuery);
</script>
<div class="content">
  <include file="public:innleft" />
  <!--商家后台右边 start-->
  <div class="sjht_right"><div class="sjht_xx"><div class="sjht_fd">
        <ul>
            <li class="jt_title">
                <a href='__KZURL__/room/index-innId-<{$inn.id}>'>[房型管理]</a>
                <a href='__KZURL__/price/index-innId-<{$inn.id}>'>[价格管理]</a>
            </li>
        </ul>
        <h2 style='line-height:40px;'><{$inn.name}></h2>
        <div style='float:left;width:30%'>
            <form class="vali" method='post' action='__KZURL__/price/op-innId-<{$inn.id}>'>
                名称：<input type='text' name='name' required="required" data-message="请填写时间段名称！" />
                起始日期：<input type='text' name='begin' required="required" data-message="请填写起始日期！" />
                截止日期：<input type='text' name='end' required="required" data-message="请填写截止日期！" />
                <input type='submit' name='add' value='添加' />
            </form>
            <ul>
                <volist name='prices' id='vo'>
                <li><a href="__KZURL__/price/index-innId-<{$inn.id}>-pid-<{$vo.id}>"><{$vo.name}></a></li>
                </volist>
            </ul>
        </div>
        <div style='float:left;width:69%'>
            <empty name='price'>
            请点击左边的时间段列表进行详细价格设置
            <else/>
            <form class="vali" method='post' action='__KZURL__/price/op-innId-<{$inn.id}>'>
                <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>名称</td>
                        <td><input type="text" name='name' value='<{$price.name}>' required="required" data-message="请填写时间段名称！" /></td></tr>
                    <tr>
                        <td>起始日期</td>
                        <td><input type="text" name='begin' value='<{$price.begin|date="Y-m-d",###}>' required="required" data-message="请填写起始日期！" /></td></tr>
                    <tr>
                        <td>截止日期</td>
                        <td><input type="text" name='end' value='<{$price.end|date="Y-m-d",###}>' required="required" data-message="请填写截止日期！" /></td></tr>
                    <tr>
                        <td>排序</td>
                        <td><input type="text" name='display_order' value='<{$price.display_order}>' /></td></tr>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0">
                  <caption><h2 style='line-height:40px;'>详细价格设置</h2></caption>
                  <tr class="title">
                    <td>房型名称</td>
                    <td>市场价</td>
                    <td>梦之旅价</td>
                    <td>提前预定天数</td>
                    <td>定金支付比例</td>
                    <td>库存数</td>
                    <td>按天设置价格</td>
                  </tr>
                  <volist name='roomList' id='vo'>
                  <tr>
                    <td><{$vo.name}></td>
                    <td><input type='text' size='5' name='prices[<{$vo.id}>][scj]' value='<{$vo.priceSet.scj}>' /></td>
                    <td><input type='text' size='5' name='prices[<{$vo.id}>][mzlj]' value='<{$vo.priceSet.mzlj}>' /></td>
                    <td><input type='text' size='5' name='prices[<{$vo.id}>][tiqianyudin]' value='<{$vo.priceSet.tiqianyudin}>' /></td>
                    <td><input type='text' size='5' name='prices[<{$vo.id}>][zfbl]' value='<{$vo.priceSet.zfbl}>' /></td>
                    <td><input type='text' size='5' name='prices[<{$vo.id}>][kucunshu]' value='<{$vo.priceSet.kucunshu}>' /></td>
                    <td>
                        <a href="__KZURL__/price/dayprice-innId-<{$inn.id}>-roomid-<{$vo.id}>">按天设置价格</a>
                    </td>
                  </tr>
                  </volist>
                </table>
                <input type="hidden" value='<{$price.id}>' name='id'>
                <input class="jx" type="submit" name='modify' value="保存设置" />
                <input class="jx" type="button" onclick='if(confirm("删除数据不可恢复，是否确认删除？"))window.location.href="__KZURL__/price/op-innId-<{$inn.id}>-delete-<{$price.id}>"' value="删除数据" />
            </form>
            </empty>
        </div>
    </div></div></div>
</div>
<include file='./Index/Tpl/Home/default/public/footer.htm' />